﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing;

namespace PHMEE
{
    public class Company : FullAuditedAggregateRoot<Guid>
    {
        protected Company()
        {

        }
        public Company(Guid id, string name) : base(id)
        {
            SetName(name);
        }
        /// <summary>
        /// 公司名称
        /// </summary>
        public string Name { get; private set; }
        /// <summary>
        /// 公司信息
        /// </summary>
        public string Info { get; set; }
        /// <summary>
        /// 公司类型
        /// </summary>
        public CompanyTypeEnum Type { get; set; }

        /// <summary>
        /// 用户集合
        /// </summary>
        public List<Guid> UserIds { get; set; } = new List<Guid>();

        public Company SetName(string name)
        {
            Name = Check.NotNullOrEmpty(name, nameof(name), CompanyConst.MaxNameLength);
            return this;
        }
    }
}
